﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Work1115
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.Write("2");
            int b = 0;
            for (int i = 3; i < 100000; i++)
            {

                for (int j = 2; j <= i; j++)
                {
                    if (i % j == 0 && i != j)
                    {

                        break;

                    }
                    if (i % j == 0 && i == j)
                    {
                        Console.Write(i);
                        Console.Write(" ");
                        b++;
                        if (b % 50 == 0)
                        {
                            Console.WriteLine(" ");
                        }
                    }


                }

            }
            Console.WriteLine("一万以内的质数总数为：{0}", b + 1);
            Console.ReadKey();
        }
    }
}
